package com.xiangmo.travel.Service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiangmo.travel.Dto.LoginDto;
import com.xiangmo.travel.Dto.UserDto;
import com.xiangmo.travel.Dto.UserUpdateDto;
import com.xiangmo.travel.Dvo.OtherUserDvo;
import com.xiangmo.travel.Dvo.TableCollectDvo;
import com.xiangmo.travel.Entity.User;

import java.util.List;


/**
* @author a1304
* @description 针对表【user】的数据库操作Service
* @createDate 2023-03-18 11:59:44
*/
public interface UserService extends IService<User> {
    String userLogin(LoginDto loginDto);
    int register(UserDto userDto);
    User checkUser(String username);
    User getUserById(Long id);
    //修改用户数据
    int setUserInfo(UserUpdateDto userUpdateDto);
    //跳转其他用户的个人页面信息=========
    OtherUserDvo getOtherUserInfo(Long userId, Long likesId);
    //查询用户的被喜欢数量
    Long getNumOtherLike(Long userId);
    //其他用户对指定用户进行 点赞
    int addUserLike(Long userId, Long likesId);
    //其他用户对指定用户进行 取消点赞
    int deleteUserLike(Long userId, Long likesId);
    //用户是否点赞过
    int isLikes(Long userId, Long likesId);
    //echarts 信誉分
    List<TableCollectDvo> getCreditPoints(Long userId);
    //echarts 活跃度
    List<TableCollectDvo> getActive(Long userId);
}
